package org.raymond.iworks.study.basic.designpattern.principle.dependenceinversion;

public class DependenceInversion1 {
    public static void main(String[] args) {
        Person p1 = new Person();
        p1.receive(new Email());
    }
}

class Email {
    public String info(){
        return "email info: hello world!";
    }
}

class Person {
    public void receive(Email email){
        System.out.println(email.info());
    }
}
